package di

import (
	"fmt"
	"git.mycaigou.com/gfyx/micro-gfyx-user-service/infrastructure/repository/customer"
	"git.mycaigou.com/gfyx/micro-gfyx-user-service/infrastructure/repository/file"
	"git.mycaigou.com/gfyx/micro-gfyx-user-service/infrastructure/repository/message/sms_code"
	"git.mycaigou.com/gfyx/micro-gfyx-user-service/infrastructure/repository/organization"
	"git.mycaigou.com/gfyx/micro-gfyx-user-service/infrastructure/repository/qrcode"
	"git.mycaigou.com/gfyx/micro-gfyx-user-service/infrastructure/repository/remote/bigdata_remote"
	"git.mycaigou.com/gfyx/micro-gfyx-user-service/infrastructure/repository/remote/gfyx_oppty_service_remote"
	"git.mycaigou.com/gfyx/micro-gfyx-user-service/infrastructure/repository/remote/openapi_remote"
	wechatApiRemore "git.mycaigou.com/gfyx/micro-gfyx-user-service/infrastructure/repository/remote/wechat_api_remote"
	"git.mycaigou.com/gfyx/micro-gfyx-user-service/infrastructure/repository/report"
	"git.mycaigou.com/gfyx/micro-gfyx-user-service/infrastructure/repository/site_announcement"
	"git.mycaigou.com/gfyx/micro-gfyx-user-service/infrastructure/repository/strategic_monitor"
	"git.mycaigou.com/gfyx/micro-gfyx-user-service/infrastructure/repository/tenant/create_tenant"
	tenant2 "git.mycaigou.com/gfyx/micro-gfyx-user-service/infrastructure/repository/tenant/tenant"
	"git.mycaigou.com/gfyx/micro-gfyx-user-service/infrastructure/repository/user"
)

func (c *inject) InjectRepo() {
	repos := []interface{}{
		file.NewFileRepository,
		organization.NewOrganizationRepository,
		qrcode.NewQrcodeRepository,
		report.NewReportShareRepository,
		sms_code.NewSmsCodeRepository,
		user.NewCommonUserBindRepository,
		user.NewCommonUserDataRepository,
		user.NewCommonUserLoginRecodeRepository,
		user.NewUserApplyRepo,
		wechatApiRemore.NewWechatApiRepository,
		customer.NewCustomerGroupRepository,
		bigdata_remote.NewBigDataServiceRepo,
		create_tenant.NewTenantsCreateTjLogRepository,
		create_tenant.NewTenantsCreateTaskRepository,
		create_tenant.NewTenantsCreateTaskLogRepository,
		tenant2.NewTenantsRepository,
		tenant2.NewTenantsInstanceRepository,
		tenant2.NewTenantsProfitRepository,
		strategic_monitor.NewStrategicMonitorRepository,
		openapi_remote.NewCompanyRepo,
		site_announcement.NewSiteAnnouncementRepository,
		gfyx_oppty_service_remote.NewGfyxOpptyServiceRepository,
	}
	var errs []error
	for _, repo := range repos {
		err := c.Provide(repo)
		if err != nil {
			errs = append(errs, err)
		}
	}
	fmt.Printf("InjectRepo errors:#%+v\n", errs)
}
